﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;
using System.Net;
using System.Threading;

namespace Networking
{
    public class UDPClient
    {
        UdpClient client;

        IPAddress ipAddress;
        int port;
        IPEndPoint endpoint;

        Thread listener;

        public UDPClient(string ip, int port)
        {
            this.ipAddress = IPAddress.Parse(ip);
            this.port = port;

            endpoint = new IPEndPoint(ipAddress, port);

            client = new UdpClient();
        }

        protected void Connect()
        {
            while (true)
            {
                byte[] data = client.Receive(ref endpoint);


            }
        }
    }
}
